CREATE TABLE [dbo].[EmailSetting](
	[EmailSettingId] [int] IDENTITY(1,1) NOT NULL,
	[EmailSettingName] [varchar](50) NOT NULL,
	[EmailFrom] [varchar](255) NULL,
	[ServerHost] [varchar](255) NOT NULL,
	[ServerPort] [int] NOT NULL,
	[UserName] [varchar](50) NOT NULL,
	[Password] [varchar](50) NOT NULL,
	[UseSSL] [bit] NOT NULL,
	[IsDefault] [bit] NOT NULL,
 CONSTRAINT [PK_EmailSetting] PRIMARY KEY CLUSTERED 
(
	[EmailSettingId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[EmailSetting] ADD  CONSTRAINT [DF_EmailSetting_ServerPort]  DEFAULT ((25)) FOR [ServerPort]
GO

ALTER TABLE [dbo].[EmailSetting] ADD  CONSTRAINT [DF_EmailSetting_UseSSL]  DEFAULT ((0)) FOR [UseSSL]
GO

ALTER TABLE [dbo].[EmailSetting] ADD  CONSTRAINT [DF_EmailSetting_IsDefault]  DEFAULT ((0)) FOR [IsDefault]
GO


